package com.maiyawx.mall.service;

import com.maiyawx.mall.entity.Accounts;
import com.maiyawx.mall.mapper.AccountsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 小程序账号服务
 */
@Service
public class AccountsService {

    @Autowired
    private AccountsMapper accountsMapper;

    /**
     * 根据主键查询数据
     * @param appid
     * @return
     */
    public Accounts selectByPrimaryKey(String appid)
    {
        return accountsMapper.selectByPrimaryKey(appid);
    }

    /**
     * 查询秘钥
     * @param appid
     * @return
     */
    public String selectSecret(String appid)
    {
        return accountsMapper.selectSecret(appid);
    }
}
